IDP Mapper Setup in Shakudo Keycloak
This document provides detailed guidance for setting up Identity Provider (IDP) mappers in Shakudo Keycloak. These mappers are essential for translating identity provider attributes into Shakudo Keycloak-specific roles and user representations.
Prerequisites
Before proceeding with this setup, ensure that you have:
- A running Shakudo Keycloak instance.
- Administrative access to the Shakudo Keycloak Admin Console.
Steps to Set Up IDP Mapper in Shakudo Keycloak
Log in to the Shakudo Keycloak Admin Console
- Open your Shakudo Keycloak Admin Console.
- Enter your administrator credentials to access the dashboard.
Navigate to Identity Providers
- In the left-hand navigation panel, click on
Identity Providersto view the list of configured identity providers.
- In the left-hand navigation panel, click on
Select Your Identity Provider
- Click on the name of the identity provider you wish to configure. This will take you to the settings for that particular provider.
Add a Mapper
- Go to the
Mapperstab. - Click
Addto create a new mapper. - Fill in the required fields such as
Name,Mapper Type,Attribute Name, etc. - Configure the other settings, including claim mapping, attribute mapping, etc.
- Go to the
Save the Configuration
- After configuring the settings, click
Saveto apply changes.
- After configuring the settings, click
Test the Configuration
- Ensure that the mapper works as expected by testing it through a login flow.
Reference these steps during the configuration process to ensure correct setup and integration across your services.
Example: Azure AD Integration
This section provides a step-by-step example for configuring Azure AD to correctly import preferred_username as both email and username in Shakudo Keycloak using IDP mappers.
Step-by-Step Configuration
- Access Azure AD Configuration:
- Log in to the Azure portal.
- Navigate to
Azure Active Directoryand selectApp registrations.
Shakudo Keycloak IDP Mapper Setup:
- Log in to the Shakudo Keycloak Admin Console.
- Navigate to
Identity Providersand select Azure AD from your configured providers. - Go to the
Mapperstab and clickAdd.
Create Mapper for
preferred_username:- Set the
Nameto "Preferred Username to Email". - Choose
Mapper TypeasAttribute Importer. - Set
Attribute Nametopreferred_username. - Map this attribute to the
emailandusernamefields in Shakudo Keycloak by settingUser Attribute Nametoemail, then create another mapper setting it tousername.
- Set the
Save the Configuration:
- Click
Savefor both mappers to save your configurations.
- Click
Test the Integration:
- Perform a test login using Azure AD credentials.
- Verify that the
preferred_usernameis correctly mapped in Shakudo Keycloak as bothemailandusername.
By following these steps, you can ensure that Azure AD is configured to pass the preferred_username correctly to Shakudo Keycloak, where it will be mapped to the email and username fields for user accounts.